package threading;

class Mythread extends Thread {
           public void run() {
               System.out.println("调用run()方法时的状态" + this.getState());
               System.out.println("hello world");
        }

}
public class ThreadDemo1 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Mythread();
        System.out.println("实例化Thread之后的状态： " + t.getState());
        t.start();
        System.out.println("调用start()方法之后的状态" + t.getState());
        t.sleep(1000);
        System.out.println("run()方法执行之后的状态" + t.getState());
    }
}
